<?php

namespace App\Http\Controllers\Ceb;

use App\Constants\UserFilterType;
use App\Models\Channel;
use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Ceb\BaseController as Controller;

class UserController extends Controller
{
    public function filters(Request $request){
        $int_FilterType = $request->get('filter_type');
        $arr_FilterList = $request->get('filter_list');
        $int_Page = $request->get('page',1);
        $int_PageSize = $request->get('page_size',10);
        $arr_AttrList = $request->get('attr_list');
        if($int_FilterType == UserFilterType::CHANNEL){
//            Channel::whereIn('id',)
        }else if($int_FilterType == UserFilterType::USER_GROUP){

        }else{
            $this->output(0,'对象类型错误! => ' . $int_FilterType);
        }
        return $this->output(1,'',[
            'count' => 100,
            'list' => [
                ['id' => 1,'phone' => 19999999999,'name' => '用户1'],
                ['id' => 2,'phone' => 19999999998,'name' => '用户2'],
                ['id' => 3,'phone' => 19999999997,'name' => '用户3'],
                ['id' => 4,'phone' => 19999999996,'name' => '用户4'],
                ['id' => 5,'phone' => 19999999995,'name' => '用户5'],
                ['id' => 6,'phone' => 19999999994,'name' => '用户6'],
                ['id' => 7,'phone' => 19999999993,'name' => '用户7'],
                ['id' => 8,'phone' => 19999999992,'name' => '用户8'],
                ['id' => 9,'phone' => 19999999991,'name' => '用户9'],
                ['id' => 10,'phone' => 19999999990,'name' => '用户10'],
            ],
            'page' => $int_Page,
            'page_size' => $int_PageSize
        ]);
    }
}
